<template>
	<view class="bind">
		<image class="logo" src="../../static/img/logo.png" @click="ss" />
		<clxDialog :isShow='show' @dialogConfirm='dialogConfirm'  
		:isShowCancel="false" :content="dialogContent"></clxDialog>
	</view>
</template>

<script>
	import clxDialog from '@/components/clx-dialog/clx-dialog.vue'
	export default {
		components: {
			clxDialog
		},
		data() {
			return {
				id: '',
				show: false,
				dialogContent:"绑定成功，请进入"
			}
		},
		methods: {
			dialogConfirm() { // 显示弹框
				this.show=false
			},
			ss: function() {
				this.show=true
			},
			async fetch() {
				const app = getApp().globalData
				const result = await this.request({
					url: '/dy_mini_program/userAuthorDyMiniProgram',
					loading: true,
					data: {
						code: "",
						anonymousCode: "",
						appid: app.appid,
						cashUserId: this.id
					}
				})
				this.info = result
				console.log(result)
			}
		},
		computed: {

		},
		onLoad(options) {
			if (options.appletGameId) {
				this.id = +options.appletGameId
			}
			if (options.cashUserId) {
				this.cashUserId = +cashUserId
			}
			this.fetch()
		}
	}
</script>

<style lang="scss" scoped>
	.bind {
		position: relative;
		min-width: 100vw;
		min-height: 100vh;
		background-color: black;
		padding-top: 50rpx;

		&-id {
			background-color: #FFFFFF;
			position: absolute;
			bottom: 20rpx;
			left: 40rpx;
			z-index: 2;
			background-color: transparent;
			color: #FFFFFF;
		}

		.logo {
			width: 300rpx;
			height: 300rpx;
			margin: 0 auto 0 auto;
		}
	}

	.navbar {
		position: fixed;
		width: 100%;
		display: flex;
		align-items: center;
		padding: 0 20rpx;
		z-index: 5;
	}
</style>
